package com.tea.Model.dto;

import com.tea.Model.GoodsSpec;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class GoodsAddDTO {

    //名称
    @NotBlank(message = "名称不可为空")
    private String name;
    //描述
    private String description;
    //所属分类
    @NotNull(message = "所属分类id不可为空")
    private Long categoryId;
    //规格列表
    @NotEmpty(message = "商品规格不可为空")
    private List<GoodsSpec> specList;
    //主图地址
    private String coverImage;
    //副图地址
    private List<String> otherImages;

}
